(1) Field of the Invention
The present invention relates to a backup system, a backup method, a database apparatus and a backup apparatus, and more particularly, to a backup system including a database apparatus having a plurality of databases and a backup apparatus for providing a backup of information stored in the database apparatus, a backup method, a database apparatus and a backup apparatus for such a system.
(2) Description of the Related Art
In recent highly information-oriented society, damage to information processing systems by an earthquake or the like can exert a nonnegligible influence on the society.
If a database apparatus is damaged by disaster, data that had been collected before the disaster can possibly be lost, and if this occurs, not only continued provision of service fails but also the loss of data of high utility value accumulated over a long term entails an enormous loss of property.
To avoid such a situation, a backup apparatus for providing a backup of data stored in a database apparatus is installed at a remote place and the two are connected to each other by a high-speed digital line etc. to maintain identity of their data so that even in the event the database apparatus suffers from disaster, service can be continuously provided by the backup apparatus.
FIG. 11 is a conceptual diagram illustrating operation of a conventional database apparatus in combination with a backup apparatus.
As shown in FIG. 11, a database apparatus 10 comprises an application program 10a, a database (hereinafter abbreviated as DB) #a 10b, and a DB#b 10c. 
Log files #1 and #2 are in practice constituted by a high-speed digital line etc. and transfer journals, which indicate the contents of updates of the DB#a 10b and DB#b 10c updated as a result of transactions carried out by the application program 10a, to a backup apparatus 20.
The backup apparatus 20 is constituted by parts associated respectively with the DB#a 10b and DB#b 10c. The part associated with the DB#a 10b comprises an editing section 21a, an edited data set storage section 21b, a reflecting section 21c, a spanned data storage section 21d, and a backup DB#a 21e. On the other hand, the part associated with the DB#b 10c comprises an editing section 22a, an edited data set storage section 22b, a reflecting section 22c, a spanned data storage section 22d, and a backup DB#b 22e. 
When a request for processing, for example, has been made by a client device, not shown, the application program 10a of the database apparatus 10 performs a corresponding transaction. If, on completion of the transaction, it is found that data needs to be updated, the application program updates the contents of the DB#a 10b and DB#b 10c, and also creates journals indicating the contents of updates. The data associated with the DB#a 10b is transmitted as the log file #1, while the data associated with the DB#b 10c is transmitted as the log file #2.
The editing section 21a acquires journals relating to the DB#a 10b, among those transmitted from the database apparatus 10, and performs, for example, an editing process such as rearrangement of order of journals and a process for verifying the interrelation of journals.
The edited data set storage section 21b temporarily stores journals whose interrelation has been verified, among those edited by the editing section 21a. 
The reflecting section 21c looks up the journals stored in the edited data set storage section 21b and updates the DB#a 21e. 
The spanned data storage section 21d stores journals whose interrelation could not be verified.
On the other hand, the editing section 22a acquires journals relating to the DB#b 10c, among those transmitted from the database apparatus 10, and performs, like the editing section 21a, an editing process such as rearrangement of order of journals and a process for verifying the interrelation of journals.
The edited data set storage section 22b temporarily stores journals edited by the editing section 22a. 
The reflecting section 22c looks up the journals stored in the edited data set storage section 22b and updates the DB#b 22e. 
The spanned data storage section 22d stores journals whose interrelation could not be verified.
Operation of the aforementioned conventional apparatus will be now described. Let it be assumed that a certain transaction has been conducted by the application program 10a of the database apparatus 10 and that as a result, the contents of the DB#a 10b and DB#b 10c are updated.
Thereupon, a journal a1 indicating the contents of updates of the DB#a 10b and a journal b1 indicating the contents of updates of the DB#b 10c are created, as shown in the leftmost part of FIG. 12. The journals a1 and b1 are transmitted to the backup apparatus 20 as the log files #1 and #2, respectively.
In the backup apparatus 20, the editing section 21a receives the journal a1 transmitted thereto as the log file #1, performs the predetermined editing process, and then stores the edited journal in the edited data set storage section 21b. Also, the editing section 22a receives the journal b1 transmitted thereto as the log file #2, performs the predetermined editing process, and then stores the edited journal in the edited data set storage section 22b. 
Let it be assumed that another transaction is thereafter conducted by the application program 10a and that journals a2 and b2 are created. As in the aforementioned case, these journals are transmitted to the backup apparatus 20 as the log files #1 and #2, respectively, are subjected to the editing process by the editing sections 21a and 22a, respectively, and then stored in the respective edited data set storage sections 21b and 22b. 
If still another transaction is thereafter conducted by the application program 10a and a journal b3 alone is created, this journal is transmitted to the backup apparatus 20 as the log file #2, and then is stored in the edited data set storage section 22b after being subjected to the editing process by the editing section 22a. 
Similarly, if a further transaction is conducted by the application program 10a and a journal b4 alone is created, this journal is transmitted to the backup apparatus 20 as the log file #2, and then is stored in the edited data set storage section 22b after being subjected to the editing process by the editing section 22a. 
In this manner, the journals a1, a2 and b1-b4 are created and transmitted to the backup apparatus 20, whereupon the reflecting sections 21c and 22c perform a process for updating the DB#a 21e and DB#b 22e, respectively, based on the journals.
Specifically, the reflecting sections 21c and 22c look up the journals stored in each other's edited data set storage section 22b, 21b to see if there is a journal interrelated with the one stored in their own edited data set storage sections 21b and 22b. If such a journal exists, the reflecting section acquires the corresponding journal and performs the updating process.
In the aforementioned example, the journals a1 and a2 are interrelated with the journals b1 and b2, respectively. Accordingly, the reflecting section 21c updates the DB#a 21e based on the journals a1 and a2, and the reflecting section 22c updates the DB#b 22e based on the journals b1 and b2. The DBs are updated only if there exist interrelated journals (e.g., the journals a1 and b1), in order to ensure consistency of data in the two DBs.
Journals a3 and a4 interrelated with the journals b3 and b4 do not exist, and therefore, the journals b3 and b4 are temporarily stored in the spanned data storage section 22d as spanned data.
If journals a5 and b5, for example, are received thereafter, the reflecting section 22c judges that the journals a3 and a4 do not exist, so that the reflecting section 22c acquires the journals b3 and b4 from the spanned data storage section 22d and updates the DB#b 22e based on the acquired journals.
The process described above enables the DB#a 21e and DB#b 22e of the backup apparatus 20 to hold respective backups of the data stored in the DB#a 10b and DB#b 10c of the database apparatus 10.
However, if the database apparatus 10 is damaged by disaster while spanned data is held in the spanned data storage section 21d or 22d, then no succeeding journals are transmitted any longer. It is therefore impossible to determine whether the spanned data is a journal interrelated with some other journal or not, so that the spanned data has to be discarded.
Accordingly, the conventional system is associated with a problem that since the interrelation cannot be verified in case of damage due to disaster, there is no alternative but to discard journals that originally need not be discarded.
Further, if journals are discarded, consistency between the backup apparatus 20 and the database apparatus 10 cannot be guaranteed, making it difficult to immediately resume the service.